/*
 * $Id: GeodataModel.java 42 2013-04-17 15:33:59Z gabakyan $
 * $Author: gabakyan $
 * $Revision: 42 $
 * $Date: 2013-04-17 15:33:59 +0000 (Wed, 17 Apr 2013) $
 *
 * Copyright (c) 2013 Supply Chain Intelligence (SCI), Inc.
 * http://www.scintelligence.com/, Email: info@scintelligence.com
 * All rights reserved.
 *
 * This file is part of Logistics Map.
 *
 * Logistics Map is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * Logistics Map is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Logistics Map.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.sci.logisticsmap.data.model;

import com.sci.logisticsmap.support.model.GeodataStatistics;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * The Geodata model.
 *
 * @author gabakyan@gmail.com (Last modified by $Author: gabakyan $)
 * @version $Revision: 42 $
 */
@SuppressWarnings("unused")
@Document(collection="geodata")
public class GeodataModel implements Serializable {
    /**
     * The serial version id.
     */
    private static final long serialVersionUID = 1L;

    /**
     * The id.
     */
    @Id
    private String id;
    /**
     * The status.
     */
    private String status;
//    /**
//     * The locations.
//     */
//	@DBRef
//    private List</*? extends */Location> locations;
    /**
     * The user.
     */
	@DBRef
    private UserModel user;
    /**
     * The session id.
     */
    private String sessionId;
    /**
     * The statistics.
     */
    private GeodataStatistics statistics;
    /**
     * The creation date.
     */
    private Date creationDate;

    /**
     * The default constructor.
     * Creates a new Geodata model.
     */
    public GeodataModel() {
    }

    /**
     * The persistence constructor.
     * Creates a new Geodata model.
     *
     * @param status The status.
     * @param user The user.
     * @param sessionId The session id.
     * @param statistics The statistics.
     * @param creationDate The creation date.
     */
    @PersistenceConstructor
    public GeodataModel(String status, UserModel user, String sessionId, GeodataStatistics statistics, Date creationDate) {
//    public GeodataModel(String status, List</*? extends */LocationModel> locations, User user, String sessionId, GeodataStatistics statistics, Date creationDate) {
        this.status = status;
        //this.locations = locations;
        this.user = user;
        this.sessionId = sessionId;
        this.statistics = statistics;
        this.creationDate = creationDate;
    }

    /**
     * Gets the id.
     *
     * @return The id.
     */
    public String getId() {
        return id;
    }

    /**
     * Sets the id.
     *
     * @param id The id.
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Gets the status.
     *
     * @return The status.
     */
    public String getStatus() {
        return status;
    }

    /**
     * Sets the status.
     *
     * @param status The status.
     */
    public void setStatus(String status) {
        this.status = status;
    }

//    /**
//     * Gets the locations.
//     *
//     * @return The locations.
//     */
//    public List</*? extends */Location> getLocations() {
//        return locations;
//    }
//
//    /**
//     * Sets the locations.
//     *
//     * @param locations The locations.
//     */
//    public void setLocations(List</*? extends */Location> locations) {
//        this.locations = locations;
//    }

    /**
     * Gets the user.
     *
     * @return The user.
     */
    public UserModel getUser() {
        return user;
    }

    /**
     * Sets the user.
     *
     * @param user The user.
     */
    public void setUser(UserModel user) {
        this.user = user;
    }

    /**
     * Gets the session id.
     *
     * @return The session id.
     */
    public String getSessionId() {
        return sessionId;
    }

    /**
     * Sets the session id.
     *
     * @param sessionId The session id.
     */
    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    /**
     * Gets the statistics.
     *
     * @return The statistics.
     */
    public GeodataStatistics getStatistics() {
        return statistics;
    }

    /**
     * Sets the statistics.
     *
     * @param statistics The statistics.
     */
    public void setStatistics(GeodataStatistics statistics) {
        this.statistics = statistics;
    }

    /**
     * Gets the creation date.
     *
     * @return The creation date.
     */
    public Date getCreationDate() {
        return creationDate;
    }

    /**
     * Sets the creation date.
     *
     * @param creationDate The creation date.
     */
    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }
}
